#include <REGX52.H>
#include "LCD1602.h"
#include "Timer.h"
#include "Delay.h"

unsigned char year=23;
unsigned char month=12;
unsigned char day=5;
unsigned char hour;
unsigned char minute;
unsigned char miao;
unsigned int ms;


void main()
{
	Timer_Init();
	LCD_Init();
	while(1)
	{
		LCD_ShowNum(1,1,year,2);
		LCD_ShowChar(1,3,'.');
		LCD_ShowNum(1,4,month,2);
		LCD_ShowChar(1,6,'.');
		LCD_ShowNum(1,7,day,2);
		LCD_ShowNum(2,1,hour,2);
		LCD_ShowChar(2,3,':');
		LCD_ShowNum(2,4,minute,2);
		LCD_ShowChar(2,6,':');
		LCD_ShowNum(2,7,miao,2);
	}
}


void Up() interrupt 1
{
	TL0 = 0xCD;	
	TH0 = 0xD4;	
	ms++;
	if(ms>=1000)
	{
		ms=0;
		miao++;
	}
}